home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / Direct3D / Billboard / readme.txt < prev   
Text File  |  2001-10-10  |  3KB  |  61 lines

  1. //-----------------------------------------------------------------------------
  2. // Name: Billboard Direct3D Sample
  3. // 
  4. // Copyright (C) 1999-2001 Microsoft Corporation. All rights reserved.
  5. //-----------------------------------------------------------------------------
  6.  
  7.  
  8. Description
  9. ===========
  10.    The Billboard sample illustrates the billboarding technique. Rather than
  11.    rendering complex 3D models (such as a high-polygon tree model),
  12.    billboarding renders a 2D image of the model and rotates it to always face
  13.    the eyepoint. This technique is commonly used to render trees, clouds,
  14.    smoke, explosions, and more. For more information, see 
  15.    Common Techniques and Special Effects.
  16.  
  17.    The sample has a camera fly around a 3D scene with a tree-covered hill. The
  18.    trees look like 3D objects, but they are actually 2-D billboarded images
  19.    that are rotated towards the eye point. The hilly terrain and the skybox 
  20.    (6-sided cube containing sky textures) are just objects loaded from .x
  21.    files, used for visual effect, and are unrelated to the billboarding
  22.    technique.
  23.    
  24. Path
  25. ====
  26.    Source:     DXSDK\Samples\Multimedia\Vbsamples\Direct3D\Billboard
  27.    Executable: DXSDK\Samples\Multimedia\vbsamples\Direct3D\Bin
  28.  
  29.  
  30. User's Guide
  31. ============
  32.    The following keys are implemented. The dropdown menus can be used for the
  33.    same controls.
  34.  
  35.       <F2>        Prompts user to select a new rendering device or display mode
  36.       <Alt+Enter> Toggles between fullscreen and windowed modes
  37.       <Esc>       Exits the app.
  38.     
  39.  
  40. Programming Notes
  41. =================
  42.    The billboarding technique is the focus of this sample. Each frame, the
  43.    camera is moved, so the viewpoint changes accordingly. As the viewpoint
  44.    changes, a rotation matrix is generated to rotate the billboards about
  45.    the y-axis so that they face the new viewpoint. The computation of the 
  46.    billboard matrix occurs in the FrameMove() function. The trees are also
  47.    sorted in that function, as required for proper alpha blanding, since 
  48.    billboards typically have some transparent pixels. The trees are 
  49.    rendered from a vertex buffer in the DrawTrees() function.
  50.    
  51.    Note that the billboards in this sample are constrained to rotate about the 
  52.    y-axis only, as otherwise the tree trunks would appear to not be fixed to 
  53.    the ground. In a 3D flight sim or space shooter, for effects like 
  54.    explosions, billboards are typically not constrained to one axis.
  55.    
  56.    This sample makes use of common DirectX code (consisting of helper functions,
  57.    etc.) that is shared with other samples on the DirectX SDK. All common
  58.    classes and modules can be found in the following directory:
  59.       DXSDK\Samples\Multimedia\VBSamples\Common
  60.  
  61.